// Copyright Epic Games, Inc. All Rights Reserved.

#pragma once

#include "GameFramework/Actor.h"
#include "GameplayTagAssetInterface.h"
#include "GameplayTagContainer.h"

#include "LyraTaggedActor.generated.h"


/** Interface for assets which contain gameplay tags */

/** IGameplayTagAssetInterface: 游戏玩法标签资产的标签。 */

// An actor that implements the gameplay tag asset interface

// 实现这个游戏玩法标签资产接口的Actor。
UCLASS()
class ALyraTaggedActor : public AActor, public IGameplayTagAssetInterface
{
	GENERATED_BODY()

public:
	/**
	 * Internal class to finalize UObject creation (initialize properties) after the real C++ constructor is called.
	 **/

	/**
	 * FObjectInitializer: 内部类，在真实的C++构造函数调用之后去最终创建UObject对象(初始化属性)。
	 */
	ALyraTaggedActor(const FObjectInitializer& ObjectInitializer = FObjectInitializer::Get());

	//~IGameplayTagAssetInterface

	/**
	 * Get any owned gameplay tags on the asset
	 *
	 * @param OutTags	[OUT] Set of tags on the asset
	 */

	/**
	 * 获取在资产上的所有已拥有的游戏玩法标签。
	 */
	virtual void GetOwnedGameplayTags(FGameplayTagContainer& TagContainer) const override;
	//~End of IGameplayTagAssetInterface

	//~UObject interface
	/**
	 * Whether we are compiling with the editor; must be defined by UBT
	 */

	/**
	 * WITH_EDITOR: 我们是否正在使用编辑器编辑，必须被UBT定义。
	 */
#if WITH_EDITOR
	virtual bool CanEditChange(const FProperty* InProperty) const override;
#endif
	//~End of UObject interface

protected:
	// Gameplay-related tags associated with this actor

	// 游戏玩法关联的标签联系到Actor
	UPROPERTY(EditAnywhere, BlueprintReadOnly, Category=Actor)
	FGameplayTagContainer StaticGameplayTags;
};

